{% extends 'PHPDishWebBundle:User:view_common.html.twig' %}

{% set tab = 'reply' %}

{% if replies.count %}
    {% block entry_meta %}
        <span>共发表了{{ replies.count }}个回复</span>
    {% endblock %}
{% endif %}

{% block user_content %}

    {% if replies.count %}
        <ul class="list-group resource-list">
            {% for reply in replies %}
                <li class="list-group-item">
                    <div class="text">{{ reply.body|raw }}</div>
                    <span class="meta">
                    {{ reply.createdAt|date('Y-m-d H:i:s') }} 发表在 <a href="{{ path('topic_view', {'id':  reply.topic.id}) }}">{{ reply.topic.title }}</a>
                    </span>
                    <blockquote>{{ reply.topic.summary|raw }}</blockquote>
                </li>
            {% endfor %}
        </ul>
        {% if replies.haveToPaginate %}
            <footer class="panel-footer">
                {{ pagerfanta(replies, 'twitter_bootstrap3') }}
            </footer>
        {% endif %}
    {% else %}
        <div class="empty-data">
            <p><i class="if i-comment"></i> 还没有发表过回复</p>
        </div>
    {% endif %}

{% endblock %}